package com.atwu.wl2022.util;

import org.springframework.stereotype.Component;

/**
 * @author wulejay
 * @ClassName RedisUtil
 * @Description redis工具类
 */
@Component
public class RedisKeyUtils {


	/**
	 * 拼接被点赞的文章id和点赞的人的id作为key。格式 001::1006
	 * @param articleId 被点赞的文章id
	 * @param userId  点赞的人的id
	 * @return 拼接好的字符串
	 */
	public static String getLikedKey(String articleId, String userId) {
		StringBuilder builder = new StringBuilder();
		builder.append(articleId);
		builder.append("::");
		builder.append(userId);
		return builder.toString();
	}
}
